package com.ruibang.glass.material.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 出库管理表
 * </p>
 *
 * @author mameng
 * @since 2024-04-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(description = "全量出库")
@TableName(value = "g_material_all_outbound_management")
public class MaterialALLOutboundManagement extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "出库单ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "仓库名称")
    private String warehouseName;

    @ApiModelProperty(value = "仓库code")
    private String warehouseCode;

    @ApiModelProperty(value = "仓库Id")
    private String warehouseId;

    @ApiModelProperty(value = "类型")
    private String type;

    @ApiModelProperty(value = "领料人")
    private String usePerson;

    @ApiModelProperty(value = "领料人")
    private String usePersonId;

    @ApiModelProperty(value = "领料人主管")
    private String useLeader;

    @ApiModelProperty(value = "出库用途")
    private String useReason;

    @ApiModelProperty(value = "仓管员")
    private String warehousePerson;

    @ApiModelProperty(value = "仓管员Id")
    private String warehousePersonId;

    @ApiModelProperty(value = "仓管员主管")
    private String warehouseLeader;

    @ApiModelProperty(value = "仓管员主管Id")
    private String warehouseLeaderId;

    @ApiModelProperty(value = "制单人")
    private String preparer;

    @ApiModelProperty(value = "制单人id")
    private String preparerId;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "领料部门")
    private String departName;

    @ApiModelProperty(value = "领料部门Id")
    private String departId;

    @ApiModelProperty(value = "计划领料时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime planMaterialDate;

    @ApiModelProperty(value = "订单编号")
    private String orderNumber;

//    @ApiModelProperty(value = "出库用途")
//    private String outboundPurpose;

    @ApiModelProperty(value = "物品名称")
    private String itemName;
    //
//    @ApiModelProperty(value = "物品类型")
//    private String itemType;
//
    @ApiModelProperty(value = "物品编号")
    private String itemCode;

    @ApiModelProperty(value = "0_还未通过出库申请 1_已通过出库申请")
    private String overStatus;
    //
//    @ApiModelProperty(value = "物品Id")
//    private String itemId;
//
    @ApiModelProperty(value = "条形码编号")
    private String barcodeNumber;
    //
    @ApiModelProperty(value = "批次号")
    private String batchNumber;
    //
    @ApiModelProperty(value = "单位")
    private String unit;
    //
    @ApiModelProperty(value = "数量")
    private Integer quantity;
    //
    @ApiModelProperty(value = "规格")
    private String specification;
    //
    @ApiModelProperty(value = "库位")
    private String storageLocation;
//
//    @ApiModelProperty(value = "序列号")
//    private String serialNumber;


    //    @ApiModelProperty(value = "含量（万分比）")
//    private BigDecimal contentPercentage;
//
    @ApiModelProperty(value = "供应商")
    private String supplier;

    @ApiModelProperty(value = "状态")
    private String status;

    @ApiModelProperty(value = "出库单号")
    private String outNumber;

    @ApiModelProperty(value = "审批状态")
    private String spStatus;

    @ApiModelProperty(value = "出库状态")
    private String outStatus;

    @ApiModelProperty(value = "菜单Id")
    @TableField(exist = false)
    private String menuId;

    @ApiModelProperty(value = "流程Id")
    @TableField(exist = false)
    private String processId;

    @ApiModelProperty(value = "库位Id")
    private String storageLocationId;

    @ApiModelProperty(value = "更新人Id")
    private String updateUserId;

    @ApiModelProperty(value = "更新人名称")
    private String updateUserName;

    @ApiModelProperty(value = "完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime finishDate;


    @ApiModelProperty(value = "审批状态中文")
    @TableField(exist = false)
    private String spStatusCH;

    @ApiModelProperty(value = "ids")
    @TableField(exist = false)
    private List<String> ids;


    @ApiModelProperty(value = "仓管员状态")
    private String warehouseStatus;

//    @ApiModelProperty(value = "物品Id")
//    private String orderId;

    @ApiModelProperty(value = "审批人")
    @TableField(exist = false)
    private String approveUser;

    @ApiModelProperty(value = "审批人")
    @TableField(exist = false)
    private String approveUserId;

    @ApiModelProperty(value = "审批状态")
    private String approveStatus;

    @ApiModelProperty(value = "审批节点")
    @TableField(exist = false)
    private String nodeName;

    @ApiModelProperty(value = "出库申请物料表")
    @TableField(exist = false)
    private List<MaterialAllOutboundItem> materialAllOutboundItemList;


}
